package com.mebs.model.util;

import com.ibm.icu.util.Calendar;

/**
 * Month
 */
public class Month {

	private Calendar calendar;
	private int number;
	private String name;
	private String shortName;

	public Month(Calendar calendar, int number, String name, String shortName)
	{
		this.calendar = calendar;
		this.number = number;
		this.name = name;
		this.shortName = shortName;
	}

	public int getNumber()
	{
		return number;
	}

	public String getName()
	{
		return name;
	}

	public String getShortName()
	{
		return shortName;
	}

	public Day[] getDays()
	{
		calendar.set(Calendar.MONTH, number - 1);
		int daysNum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
		Day[] days = new Day[daysNum];
		for (int i = 0; i < daysNum; i++) {
			days[i] = new Day(this, i + 1);
		}
		return days;
	}

}
